package com.ym.medical.service;

import com.github.pagehelper.PageInfo;
import com.ym.core.utils.tkmybatis.IBaseSV;
import com.ym.medical.domain.entity.TransactionDetailsEntity;
import com.ym.medical.domain.param.TransactionDetailsParam;
import com.ym.medical.domain.vo.TdDetailSummaryVO;
import com.ym.medical.domain.vo.TransactionDetailsVo;
import com.ym.medical.enums.PaymentWayEnum;
import com.ym.medical.enums.TransactionDetailsTdTypeEnum;

import java.math.BigDecimal;
import java.util.Date;

/**
 * ComputerName:LAPTOP-I6GKDIFQ
 * Author:admin
 * Date: 2019-06-14
 * Time: 12:30:48
 * 仅包含充值/提现交易记录服务接口
 */
public interface ITransactionDetailsSV extends IBaseSV<TransactionDetailsEntity> {
    /**构建提现交易明细
     * @param accId         用户主键
     * @param otherBillNo   渠道订单号
     * @param dfAcc         对方账户
     * @param dfAccType     对账账户类型  (PaymentWayEnum)
     * @param ioType        订单类型 (TransactionDetailsTdTypeEnum)
     * @param tdAmount      交易金额
     * @param aftTdAmount   交易后账户余额
     * @param ioNum         订单号
     * @return
     */
    Long genEmbodyTransactionDetails(Long accId, String otherBillNo, String dfAcc, PaymentWayEnum dfAccType, TransactionDetailsTdTypeEnum ioType,
                                     BigDecimal tdAmount, BigDecimal aftTdAmount, String ioNum);
    /**
     * 医生体现记录
     * @param transactionDetailsParam
     * @param pageNo
     * @param limit
     * @return
     */

    PageInfo<TransactionDetailsVo> listDoctorWithdraw(TransactionDetailsParam transactionDetailsParam, int pageNo, int limit);
    /**
     * 患者交易明细
     * @param transactionDetailsParam
     * @param pageNo
     * @param limit
     * @return
     */

    PageInfo<TransactionDetailsVo> listTransactionDetail(TransactionDetailsParam transactionDetailsParam, int pageNo, int limit);
    /**
     * PC端-账务系统 平台账务交易汇总
     * @param tdType 交易类型 （01-充值 02-提现）
     * @param startTime
     * @param endTime
     * @return
     */
    TdDetailSummaryVO tdDetailSummary(String tdType, Date startTime, Date endTime);
}
